import request from "../utils/request";

export const GET_CODE = () => {
	return request({
		url: '/admin/sendcode'
	})
}
export const GET_ACCESS_TOKEN = () => {
	return uni.request({
		url: 'https://api.weixin.qq.com/cgi-bin/token',
		method: 'GET',
		data: {
			grant_type: 'client_credential',
			appid: 'wx52d48be4d68f58a2',
			secret: 'e1e5894c7b5a4e005f84737be6b8ee31'
		}
	})
}
export const GET_PHONE_NUMBER = (accessToken, code) => {
	return uni.request({
		url: 'https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token='+accessToken,
		method: "POST",
		data: {
			code
		}
	})
}